package com.qf.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.qf.mapper.DtsOrderGoodsMapper;
import com.qf.pojo.DtsOrderGoods;
import com.qf.service.DtsOrderGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 千锋教育
 * @Company http://www.mobiletrain.org/
 * @Version 1.0
 */
@Service
public class DtsOrderGoodsServiceImpl implements DtsOrderGoodsService {

    @Autowired
    DtsOrderGoodsMapper orderGoodsMapper;

    @Override
    public List<DtsOrderGoods> findByGoodsId(Integer id) {
        LambdaQueryWrapper<DtsOrderGoods> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(DtsOrderGoods::getGoodsId, id);

        List<DtsOrderGoods> dtsOrderGoods = orderGoodsMapper.selectList(wrapper);
        return dtsOrderGoods;
    }
}
